package com.xiaoye.qbproject.controller.qbzyk;

import com.xiaoye.qbproject.controller.base.BaseController;
import com.xiaoye.qbproject.domain.AjaxResult;
import com.xiaoye.qbproject.service.BlbcWarfareExamplesRelationService;
import com.xiaoye.qbproject.vo.BlbcWarfareExamplesRelationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author : ChenYao
 * @version : 1.0
 * @description : 兵力编程编组 与 战例的关系
 * @create : 2025-01-02 12:34
 */
@RestController
@RequestMapping("/blbcWarfareExamplesRelation")
public class BlbcWarfareExamplesRelationController extends BaseController {

    @Autowired
    private BlbcWarfareExamplesRelationService blbcWarfareExamplesRelationService;

    /**
     * @param blbcWarfareExamplesRelationVo
     * @description: 设置兵力编程编组 与 战例的关系
     * @author: ChenYao
     * @return: com.xiaoye.qbproject.domain.AjaxResult
     * @ceateDate: 2025-01-02 12:39
     */

    @PostMapping("/setBlbcWarfareExamplesRelation")
    public AjaxResult setBlbcWarfareExamplesRelation(@RequestBody BlbcWarfareExamplesRelationVo blbcWarfareExamplesRelationVo) {
        blbcWarfareExamplesRelationService.setBlbcWarfareExamplesRelation(blbcWarfareExamplesRelationVo);
        return success("设置成功");
    }

    /**
     * @param blbcId
     * @description: 根据兵力编程编组id获取 兵力编程编组 与战例关系
     * @author: ChenYao
     * @return: com.xiaoye.qbproject.domain.AjaxResult
     * @ceateDate: 2025-01-02 13:02
     */

    @GetMapping("/getBlbcWarfareExamplesRelation/{blbcId}")
    public AjaxResult getBlbcWarfareExamplesRelation(@PathVariable String blbcId) {
        return success(blbcWarfareExamplesRelationService.getBlbcWarfareExamplesRelation(blbcId));
    }
}
